<template>
  <div class="app-container" ref="content">
    <div style="text-align: center;padding: 10px">《{{ inspectionRecordInfo.taskName }}》-详情信息</div>
    <div style="width: 50%;margin:0px auto;vertical-align:middle;height:100%">
      <el-form :model="inspectionRecordInfo" ref="inspectionRecordInfo" label-width="150px">
          <el-form-item label="巡检任务:" prop="taskName">
            {{ inspectionRecordInfo.taskName }}
          </el-form-item>
          <el-form-item label="巡检时间:" prop="inspectionTime">
            {{ inspectionRecordInfo.inspectionTime | dateFormat }}
          </el-form-item>
          <el-form-item label="异常数量:" prop="abnormalNum">
            {{ inspectionRecordInfo.abnormalNum }}
          </el-form-item>
          <el-form-item label="巡检结束时间:" prop="endTime">
            {{ inspectionRecordInfo.endTime | dateFormat }}
          </el-form-item>

      </el-form>
    </div>
  </div>
</template>

<script>
import {getInInspectionLogVo} from "@/api/inspectionLog";

export default {
  name: "inspectionRecordInfo",
  data() {
    return {

      inspectionRecordInfo: {},

    }
  },
  created() {
    this.$nextTick(() => {
      this.getInInspectionLogVo(this.$route.query.ucId)

    });
  },
  methods: {
    getInInspectionLogVo(val) {
      let loadingInstance = this.$loading({
        target: this.$refs.content,
        text: '数据加载中'
      });
      getInInspectionLogVo({ucId: val}).then(res => {
        console.log(res)
        this.inspectionRecordInfo = res.data
        loadingInstance.close()
        this.$notify.success({
          title: '成功',
          message: "获取巡检记录成功"
        })
      }).catch(error => {
        console.log(error)
        loadingInstance.close()
        this.$notify.error({
          title: '失败',
          message: "获取巡检记录失败"
        })
      })
    },


  }

}
</script>

<style>

</style>